<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Subkismet.DemoWeb._Default" %>
<%@ Import namespace="Subkismet"%>
<%@ Register TagPrefix="sbk" Assembly="Subkismet" Namespace="Subkismet.Captcha" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Subkismet Demo Page</title>
    
    <script type="text/javascript">
		function toggleView(id, anchorId)
		{
			var anchor = document.getElementById(anchorId);
			var element = document.getElementById(id);
			if(element.style.display != 'block')
			{
				anchor.innerHTML = '[-]';
				element.style.display = 'block';
			}
			else
			{
				anchor.innerHTML = '[+]';
				element.style.display = 'none';
			}
		}
    </script>
    
    <style type="text/css">
		body
		{
			background-color: #fff;
		}
		
		fieldset
		{
			padding: 10px;
		}
	
		fieldset legend
		{
			font-weight: bold;
			font-size: 1.1em;
			font-color: #339;
		}
		
		.collapsible
		{
			font-size: 1.1em;
			text-decoration: none;
		}
		
		a.collapsible:hover
		{
			color: #009;
		}
		
		.success, .error
		{
			font-weight: bold;
			font-size: 1.2em;
			color: #00c;
		}
		
		.error
		{
			color: #c00;
		}
		
		.form label
		{
			display: block;
			clear: both;
			float: left;
		}
		
		.form input, .form textarea
		{
			display: block;
			clear: both;
			float: left;
		}
			
		p
		{
			color: #555;
		}
		
		pre.csharpcode
		{
			border: solid 1px #333;
			padding: 10px 5px;
			background-color: #eee;
			display: none;
		}
		
		.csharpcode, .csharpcode pre
		{
			font-size: small;
			color: black;
			font-family: consolas, "Courier New", courier, monospace;
			background-color: #ffffff;
			/*white-space: pre;*/
		}
		.csharpcode pre { margin: 0em; }
		.csharpcode .rem { color: #008000; }
		.csharpcode .kwrd { color: #0000ff; }
		.csharpcode .str { color: #006080; }
		.csharpcode .op { color: #0000c0; }
		.csharpcode .preproc { color: #cc6633; }
		.csharpcode .asp { background-color: #ffff00; }
		.csharpcode .html { color: #800000; }
		.csharpcode .attr { color: #ff0000; }
		.csharpcode .alt 
		{
			background-color: #f4f4f4;
			width: 100%;
			margin: 0em;
		}
		.csharpcode .lnum { color: #606060; }
	</style>
</head>
<body>
    <form id="form1" runat="server">
    <h1>Subkismet Demo Page</h1>
    <p class="success">
      This is a page used to demo the Subkismet Spam Busting Library. 
      Learn more from the <a href="http://www.codeplex.com/subkismet/" title="Subkismet">the project page</a>.
    </p>

    <p>
		The CAPTCHA demos on this page assume you&#8217;ve registered the Subkismet.Captcha control namespace. 
		The Akismet demo assumes you&#8217;ve imported the Subkismet namespace.
    </p>
<pre class="csharpcode">
<span class="asp">&lt;%@</span> <span class="html">Register</span> <span class="attr">TagPrefix</span><span class="kwrd">="sbk"</span> <span class="attr">Assembly</span><span class="kwrd">="Subkismet"</span> <span class="attr">Namespace</span><span class="kwrd">="Subkismet.Captcha"</span> <span class="asp">%&gt;</span>
<span class="asp">&lt;%@</span> <span class="html">Import</span> <span class="attr">Namespace</span><span class="kwrd">="Subkismet"</span> <span class="asp">%&gt;</span>
</pre>

    <div>
		<fieldset>
			<legend>Invisible CAPTCHA Demo</legend>
			<p>
				Not much to see in this demo because we&#8217;re demoing the 
				<em>invisible</em> CAPTCHA control.
			</p>
			<p>
				When you click submit, you should see a success message. 
				Turn off javascript to see what&#8217;s really happening.
			</p>
<script runat="server" language="C#">
  protected void OnButtonClick(object sender, EventArgs args)
  {
    if(Page.IsValid)
    {
      successLiteral.Visible = true;
    }
  }

</script>
<p class="success">
  <asp:Literal ID="successLiteral" 
    runat="server" 
    Text="Valid!" 
    EnableViewState="false"
    Visible="false" />
</p>
<div>
  <sbk:InvisibleCaptcha id="commentValidator" 
    runat="server" 
    ErrorMessage="Oops! You must be bad at math." 
    Display="dynamic" 
    ValidationGroup="Invisible" />
  
  <asp:Button ID="invisibleDemoButton" runat="server" 
    Text="Submit" 
    OnClick="OnButtonClick" 
    ValidationGroup="Invisible" />
</div>
	<hr />
			<p>The relevant source code: <a href="javascript:toggleView('invisibledemo', 'showinvis');" id="showinvis" class="collapsible">[+]</a></p>
<pre class="csharpcode" id="invisibledemo">
<span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="attr">language</span><span class="kwrd">="C#"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">protected</span> <span class="kwrd">void</span> OnButtonClick(<span class="kwrd">object</span> sender, EventArgs args)
  {
    <span class="kwrd">if</span>(Page.IsValid)
    {
      successLiteral.Visible = <span class="kwrd">true</span>;
    }
  }

<span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">p</span> <span class="attr">class</span><span class="kwrd">="success"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">asp:Literal</span> <span class="attr">ID</span><span class="kwrd">="successLiteral"</span> 
    <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">Text</span><span class="kwrd">="Valid!"</span> 
    <span class="attr">Visible</span><span class="kwrd">="false"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">sbk:InvisibleCaptcha</span> <span class="attr">id</span><span class="kwrd">="commentValidator"</span> 
    <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">ErrorMessage</span><span class="kwrd">="Oops! You must be bad at math."</span> 
    <span class="attr">Display</span><span class="kwrd">="dynamic"</span> 
    <span class="attr">ValidationGroup</span><span class="kwrd">="Invisible"</span> <span class="kwrd">/&gt;</span>
  
  <span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">="invisibleDemoButton"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">Text</span><span class="kwrd">="Submit"</span> 
    <span class="attr">OnClick</span><span class="kwrd">="OnButtonClick"</span> 
    <span class="attr">ValidationGroup</span><span class="kwrd">="Invisible"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>

		</fieldset>
		
	<div>
		<fieldset>
			<legend>Honeypot CAPTCHA Demo</legend>
			<script type="text/javascript">
				function displayHoneypot()
				{
					document.getElementById('honeypot').style.display = 'block';
					return void(0);
				}
			</script>
			<p>
				The Honeypot Captcha should be invisible. Clicking submit will verify you are 
				not a bot. To simulate a bot, <a href="javascript:displayHoneypot();">click here</a> 
				to show the honeypot.
			</p>
			<p>
				Once you've made the honeypot visible, type something in and then click Submit. 
				Now it thinks you're a bot.
			</p>
			<p>
<asp:Label ID="honeypotSuccess" runat="server" 
	Visible="false" 
	ForeColor="Navy">Congrats! You are not a bot!</asp:Label>
<sbk:HoneypotCaptcha ID="honeypot" runat="server" 
	ErrorMessage="Doh! You are a bot!" />
<asp:Button ID="honeypotSubmit" runat="server" 
	CausesValidation="true" 
	Text="Submit" 
	OnClick="OnHoneypotDemoClick" />
			</p>
<script runat="server" language="C#">
  protected void OnHoneypotDemoClick(object sender, EventArgs args)
  {
	  honeypotSuccess.Visible = honeypot.IsValid;
  }

</script>

			<hr />
			<p>The relevant source code: <a href="javascript:toggleView('honeypotcode', 'honeypotshowlink');" id="honeypotshowlink" class="collapsible">[+]</a></p>
			<div id="honeypotcode" style="display: none;">
<pre class="csharpcode" style="display:block;"><span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="attr">language</span><span class="kwrd">="C#"</span><span class="kwrd">&gt;</span>
<span class="kwrd">protected</span> <span class="kwrd">void</span> OnHoneypotDemoClick(<span class="kwrd">object</span> sender, EventArgs args)
{
  honeypotSuccess.Visible = honeypot.IsValid;
}
<span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:Label</span> <span class="attr">ID</span><span class="kwrd">="honeypotSuccess"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">Visible</span><span class="kwrd">="false"</span> 
    <span class="attr">ForeColor</span><span class="kwrd">="Navy"</span><span class="kwrd">&gt;</span>Congrats! You are not a bot!<span class="kwrd">&lt;/</span><span class="html">asp:Label</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">sbk:HoneypotCaptcha</span> <span class="attr">ID</span><span class="kwrd">="honeypot"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">ErrorMessage</span><span class="kwrd">="Doh! You are a bot!"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">="honeypotSubmit"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">CausesValidation</span><span class="kwrd">="true"</span> 
    <span class="attr">Text</span><span class="kwrd">="Submit"</span> 
    <span class="attr">OnClick</span><span class="kwrd">="OnHoneypotDemoClick"</span> <span class="kwrd">/&gt;</span></pre>
			</div>
		</fieldset>		
	</div>
		
		<fieldset>
			<legend>Visible CAPTCHA Demo</legend>
			<p>
				This demo is a bit more visual than the previous. It 
				demonstrates the visible captcha.
			</p>
			<p>
				Click submit and you should see a success message if 
				you entered the CAPTCHA correctly. 
			</p>
<script runat="server" language="C#">
  protected void OnVisibleCaptchaButtonClick(object sender, EventArgs args)
  {
    if(Page.IsValid)
    {
      visibleSuccessLiteral.Visible = true;
    }
  }

</script>
<p class="success">
  <asp:Literal ID="visibleSuccessLiteral" 
    runat="server" 
    Text="Valid!"
    EnableViewState="false"
    Visible="false" />
</p>
<div class="captcha">
  <sbk:CaptchaControl id="captcha" 
    runat="server" 
    ErrorMessage="Oops! You must be bad at reading." 
    Display="dynamic"
    CaptchaLength="4"
    ValidationGroup="Visible" />
</div>

<div>
  <asp:Button ID="visibleButton" runat="server" 
    Text="Submit" 
    OnClick="OnVisibleCaptchaButtonClick" 
    ValidationGroup="Visible" />
</div>

<hr />
<p>The relevant source code: <a href="javascript:toggleView('visibledemo', 'showcaptcha');" id="showcaptcha" class="collapsible">[+]</a></p>
<div id="visibledemo" style="display: none;">
<p>
	To get the visible CAPTCHA to work, you need to add an entry to the <code>httpHandlers</code> section of code.
</p>

<pre class="csharpcode" style="display:block;">
<span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">="1.0"</span>?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">system.web</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">httpHandlers</span><span class="kwrd">&gt;</span>
      <strong><span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">verb</span><span class="kwrd">="*"</span> 
        <span class="attr">path</span><span class="kwrd">="*CaptchaImage.ashx"</span> 
        <span class="attr">type</span><span class="kwrd">="Subkismet.Captcha.CaptchaImageHandler, Subkismet"</span> <span class="kwrd">/&gt;</span></strong>
    <span class="kwrd">&lt;/</span><span class="html">httpHandlers</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">system.web</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">configuration</span><span class="kwrd">&gt;</span></pre>

<p>
	Then you can use it as the following demonstrates.
</p>

<pre class="csharpcode" style="display:block;">
<span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="attr">language</span><span class="kwrd">="C#"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">protected</span> <span class="kwrd">void</span> OnVisibleCaptchaButtonClick(<span class="kwrd">object</span> sender, EventArgs args)
  {
    <span class="kwrd">if</span>(Page.IsValid)
    {
      visibleSuccessLiteral.Visible = <span class="kwrd">true</span>;
    }
  }

<span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">p</span> <span class="attr">class</span><span class="kwrd">="success"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">asp:Literal</span> <span class="attr">ID</span><span class="kwrd">="visibleSuccessLiteral"</span> 
    <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">Text</span><span class="kwrd">="Valid!"</span>
    <span class="attr">EnableViewState</span><span class="kwrd">="false"</span>
    <span class="attr">Visible</span><span class="kwrd">="false"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">="captcha"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">sbk:CaptchaControl</span> <span class="attr">id</span><span class="kwrd">="captcha"</span> 
    <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">ErrorMessage</span><span class="kwrd">="Oops! You must be bad at reading."</span> 
    <span class="attr">Display</span><span class="kwrd">="dynamic"</span>
    <span class="attr">CaptchaLength</span><span class="kwrd">="4"</span>
    <span class="attr">ValidationGroup</span><span class="kwrd">="Visible"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>

<span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">="visibleButton"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
    <span class="attr">Text</span><span class="kwrd">="Submit"</span> 
    <span class="attr">OnClick</span><span class="kwrd">="OnVisibleCaptchaButtonClick"</span> 
    <span class="attr">ValidationGroup</span><span class="kwrd">="Visible"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
</div>
		</fieldset>
    </div>
    
		<fieldset>
			<legend>Akismet Demo</legend>
			<p>
				For this demo, you&#8217;ll need to enter 
				your <a href="http://wordpress.com/api-keys/" title="API Key used for Akismet">Wordpress API Key</a> 
				which is used by <a href="http://akismet.com/" title="spam buster">Akismet</a>. 
				I promise I won&#8217;t record it anywhere. It is only used for the purposes of demoing Akismet.
			</p>
<div class="form">
<script runat="server" language="C#">  

protected void VerifyApiKey(object sender, EventArgs args)
{
  Akismet<Comment> akismet = Akismet<Comment>
	  .CreateSimpleAkismet(this.apiKeyTextBox.Text, new Uri("http://localhost/"));
  verifyResultLiteral.Text = akismet.VerifyApiKey()
    ? "<span class=\"success\">Your API Key is verified.</span>"
    : "<span class=\"error\">Could not verify your API key.</span>";
}

protected void PostToAkismet(object sender, EventArgs args)
{
  Akismet<Comment> akismet = Akismet<Comment>
	  .CreateSimpleAkismet(this.apiKeyTextBox.Text, new Uri("http://localhost/"));
  Comment comment = new Comment(System.Net.IPAddress.Parse("127.0.0.1")
	  , "user-agent");
  comment.Author = this.authorTextBox.Text;
  comment.CommentType = "comment";
  comment.Content = this.bodyTextBox.Text;
  resultLiteral.Text = akismet.IsSpam(comment)
    ? "<span class=\"error\">Get ready for SPAM musubi. This is SPAM.</span>"
    : "<span class=\"success\">Enjoy the ham, it&#8217;s not SPAM.</span>";
}
</script>

<fieldset>
<legend>Verify API Key</legend>
<asp:Literal ID="verifyResultLiteral" runat="server" />
<p>Enter your WordPress API Key and click submit to verify it.</p>
<div class="form">
  <asp:Label ID="keyLabel" runat="server"
  Text="Wordpress API Key"
  AssociatedControlID="apiKeyTextBox" />
  <asp:TextBox ID="apiKeyTextBox" runat="server" />
  <div>
    <asp:Button ID="verifyButton" runat="server" 
      Text="Verify"
      CausesValidation="False" 
      OnClick="VerifyApiKey" />
  </div>
</div>
</fieldset>      

<asp:Literal ID="resultLiteral" runat="server" />        
      
<asp:Label ID="authorLabel" runat="server"
Text="Author (Enter 'viagra-test-123' to trigger a 'spam' response."
AssociatedControlID="authorTextBox" />
<asp:TextBox ID="authorTextBox" runat="server" />

<asp:Label ID="bodyLabel" runat="server"
Text="Body"
AssociatedControlID="bodyTextBox" />
<asp:TextBox ID="bodyTextBox" runat="server" 
TextMode="MultiLine" 
Columns="40" 
Rows="10" />

<div>
<asp:Button ID="submitAkismetButton" runat="server" 
  Text="Submit" 
  OnClick="PostToAkismet" />
</div>
</div>

<hr />
<p>The relevant source code: <a href="javascript:toggleView('akismetdemo', 'showakismet');" id="showakismet" class="collapsible">[+]</a></p>
<pre class="csharpcode" id="akismetdemo"><span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="attr">language</span><span class="kwrd">="C#"</span><span class="kwrd">&gt;</span>  

<span class="kwrd">protected</span> <span class="kwrd">void</span> VerifyApiKey(<span class="kwrd">object</span> sender, EventArgs args)
{
  Akismet&lt;Comment&gt; akismet = Akismet&lt;Comment&gt;
      .CreateSimpleAkismet(<span class="kwrd">this</span>.apiKeyTextBox.Text, <span class="kwrd">new</span> Uri(<span class="str">"http://localhost/"</span>));
  verifyResultLiteral.Text = akismet.VerifyApiKey()
    ? <span class="str">"&lt;span class=\"success\"&gt;Your API Key is verified.&lt;/span&gt;"</span>
    : <span class="str">"&lt;span class=\"error\"&gt;Could not verify your API key.&lt;/span&gt;"</span>;
}

<span class="kwrd">protected</span> <span class="kwrd">void</span> PostToAkismet(<span class="kwrd">object</span> sender, EventArgs args)
{
  Akismet&lt;Comment&gt; akismet = Akismet&lt;Comment&gt;
      .CreateSimpleAkismet(<span class="kwrd">this</span>.apiKeyTextBox.Text, <span class="kwrd">new</span> Uri(<span class="str">"http://localhost/"</span>));
  Comment comment = <span class="kwrd">new</span> Comment(System.Net.IPAddress.Parse(<span class="str">"127.0.0.1"</span>)
      , <span class="str">"user-agent"</span>);
  comment.Author = <span class="kwrd">this</span>.authorTextBox.Text;
  comment.CommentType = <span class="str">"comment"</span>;
  comment.Content = <span class="kwrd">this</span>.bodyTextBox.Text;
  resultLiteral.Text = akismet.IsSpam(comment)
    ? <span class="str">"&lt;span class=\"error\"&gt;Get ready for SPAM musubi. This is SPAM.&lt;/span&gt;"</span>
    : <span class="str">"&lt;span class=\"success\"&gt;Enjoy the ham, it&amp;#8217;s not SPAM.&lt;/span&gt;"</span>;
}
<span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>

<span class="kwrd">&lt;</span><span class="html">fieldset</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">legend</span><span class="kwrd">&gt;</span>Verify API Key<span class="kwrd">&lt;/</span><span class="html">legend</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:Literal</span> <span class="attr">ID</span><span class="kwrd">="verifyResultLiteral"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;</span>Enter your WordPress API Key and click submit to verify it.<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">="form"</span><span class="kwrd">&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">asp:Label</span> <span class="attr">ID</span><span class="kwrd">="keyLabel"</span> <span class="attr">runat</span><span class="kwrd">="server"</span>
  <span class="attr">Text</span><span class="kwrd">="Wordpress API Key"</span>
  <span class="attr">AssociatedControlID</span><span class="kwrd">="apiKeyTextBox"</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">asp:TextBox</span> <span class="attr">ID</span><span class="kwrd">="apiKeyTextBox"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">="verifyButton"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
      <span class="attr">Text</span><span class="kwrd">="Verify"</span>
      <span class="attr">CausesValidation</span><span class="kwrd">="False"</span> 
      <span class="attr">OnClick</span><span class="kwrd">="VerifyApiKey"</span> <span class="kwrd">/&gt;</span>
  <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">fieldset</span><span class="kwrd">&gt;</span>      

<span class="kwrd">&lt;</span><span class="html">asp:Literal</span> <span class="attr">ID</span><span class="kwrd">="resultLiteral"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="kwrd">/&gt;</span>        
      
<span class="kwrd">&lt;</span><span class="html">asp:Label</span> <span class="attr">ID</span><span class="kwrd">="authorLabel"</span> <span class="attr">runat</span><span class="kwrd">="server"</span>
<span class="attr">Text</span><span class="kwrd">="Author (Enter 'viagra-test-123' to trigger a 'spam' response."</span>
<span class="attr">AssociatedControlID</span><span class="kwrd">="authorTextBox"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:TextBox</span> <span class="attr">ID</span><span class="kwrd">="authorTextBox"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> <span class="kwrd">/&gt;</span>

<span class="kwrd">&lt;</span><span class="html">asp:Label</span> <span class="attr">ID</span><span class="kwrd">="bodyLabel"</span> <span class="attr">runat</span><span class="kwrd">="server"</span>
<span class="attr">Text</span><span class="kwrd">="Body"</span>
<span class="attr">AssociatedControlID</span><span class="kwrd">="bodyTextBox"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:TextBox</span> <span class="attr">ID</span><span class="kwrd">="bodyTextBox"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
<span class="attr">TextMode</span><span class="kwrd">="MultiLine"</span> 
<span class="attr">Columns</span><span class="kwrd">="40"</span> 
<span class="attr">Rows</span><span class="kwrd">="10"</span> <span class="kwrd">/&gt;</span>

<span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">asp:Button</span> <span class="attr">ID</span><span class="kwrd">="submitAkismetButton"</span> <span class="attr">runat</span><span class="kwrd">="server"</span> 
  <span class="attr">Text</span><span class="kwrd">="Submit"</span> 
  <span class="attr">OnClick</span><span class="kwrd">="PostToAkismet"</span> <span class="kwrd">/&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>

		</fieldset>
    </form>
</body>
</html>
